import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";

export type getUserInfoResult = {
  code: any;
  msg: string;
  data?: {
    company: string;
    count: number;
    depositedAmount: number;
    mobile: number;
    name: string;
  };
};
export type recharge = {
  code: any;
  msg: string;
  data?: any;
};

// 查询
export const getUserInfo = (data?: object) => {
  return http.request<getUserInfoResult>("post", baseUrlApi("user/info"), {
    data
  });
};

// 充值
export const addRecharge = (data?: object) => {
  return http.request<recharge>("post", baseUrlApi("user/recharge"), {
    data
  });
};
